package cn.xinfei.xdecision.engine.runner.service;

import cn.xinfei.xdecision.common.datamodel.DecisionResult;
import cn.xinfei.xdecision.engine.runner.context.PipelineContext;
import org.bson.Document;

import java.util.List;

public interface DecisionResultDetailService {

    public boolean saveReentryLog(String message);

    public boolean saveXDataQueryLog(String message);

    public boolean saveEngineNodeLog(String message);

    public boolean saveDecisionResultDetail(String message);
    public boolean upsertDecisionResultDetail(PipelineContext pipelineContext,String type) ;
    public boolean saveDecisionResultDetail(PipelineContext pipelineContext);
    public boolean upsertDecisionResultDetail(PipelineContext pipelineContext);
    public boolean updateDecisionResultState(PipelineContext pipelineContext);
    public boolean upsertDecisionResultDetailLog(PipelineContext pipelineContext,String executorDecisionId,String updateDecisionId) ;
    public boolean updateDecisionResultDetail(PipelineContext pipelineContext);

    Document getDecisionResultDetailByDecisionId(String decisionId, String engineCode);

    List<Document> getDecisionResultDetailByBizId(String bizId,String engineCode);
    PipelineContext getDecisionResultDetailByDecisionId(String bizId, String decisionId, String engineCode);
    public int updateDecisionResultDetailStateByBizId(DecisionResult decisionResult);

}
